package org.king.global;

import lombok.Data;
import lombok.Getter;
import org.king.entity.User;

/**
 *全局身份，当前用户信息
 */
@Data
public class SessionContext {
    private User currentUser;

    @Getter
    private static final SessionContext instance = new SessionContext();
    private SessionContext() {}  // 私有构造
    public void logout() {
        currentUser = null;
    }
}